package com.vincent.controller.basic;

import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * Created by Vincent on 2014/12/23.
 */
@Controller
@RequestMapping("/error")
public class ErrorController {

    @RequestMapping("/404")
    public String notfound(HttpSession session){
        SecurityUtils.getSubject().logout();
        return "/error/404";
    }
    @RequestMapping("/500")
    public String error(HttpSession session){
        SecurityUtils.getSubject().logout();
        return "/error/500";
    }
}
